; Ken.Kuang for Shark3 Debug information
; 2017
; Version @ 0000
ASSERT SOFTWARE.BUILD.BASE()>=57080. "The Trace32 software too old"

;cp_pub_address
;0x02000000
;cp_wtl_address
;0x32000000
;ap_address
;0x40000000
;aon_address
;0x40000000

;share IRAM
;0x00010000
ENTRY &MEM_TYPE="EAXI" &AON_SIRAM_ADDR=0x00010000 &AON_BASE_ADDR=0x40000000 &DMC_BASE_ADDR=0x30000000
ASSERT DATA.LONG(AVM:0x0)==0x5577 "Please use Per_Preload.cmm!"

CONFIG 16. 8.
WIDTH 23.

; ############################ START OF DJTAG ############################
BASE EAPB:0x0

TREE "DJTAG Scan"

TREE "DEBUG SIGNAL"

	include djtag_chain_sharkl3.per

TREE.END

;include BusMon.per

TREE "VOLTAGE DOMAIN STATUS"
TEXTLINE "if TAPID == 0x2381C5FF, It's On, else is Off"
SGROUP "AP Voltage Domain"
	VARX 0x04 %l DJTAG.SWITCH(0x01)
	VARX 0x00 %l DJTAG.EXECUTE(0x00000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "MM Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x01000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "GPU Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x02000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "AON Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x03000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "PUB Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x04000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "WTLCP Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x05000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "PUBCP Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x06080180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "APCPU Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x07000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "MMVSP Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x08000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "WCN Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x09000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "
SGROUP "DISP Voltage Domain"
	VARX 0x00 %l DJTAG.EXECUTE(0x0A000180,0)
	LINE.LONG 0x00 " TAPID , TAPID(Chan01) "

TREE.END


TREE.END
; ############################ END OF DJTAG ############################

include L3_A55.per


;CONFIG 16. 8.
WIDTH 23.

TREE "DDR"
BASE &MEM_TYPE:(&AON_BASE_ADDR+0x002B0000)
	RGROUP.LONG 0x250++0x03 "PMU"
	TEXTLINE ""
	LINE.LONG 0x00 " PUB_ACC_RDY , PUB_ACC_RDY "
	BITFLD.LONG 0x00 0.      " RDY , PUB_ACC_RDY "
	RGROUP.LONG 0x254++0x03
	TEXTLINE ""
	LINE.LONG 0x00 " PUB_CLK_RDY , PUB_CLK_RDY "
	BITFLD.LONG 0x00 0.      " RDY , PUB_CLK_RDY "


	BASE &MEM_TYPE:(&AON_BASE_ADDR+0x002E0000)
	RGROUP.LONG 0xA0++0x03 "DFS"
	TEXTLINE ""
	LINE.LONG 0x00 " SOFT_DFS_CTRL , SOFT_DFS_CTRL "

	RGROUP.LONG 0xA4++0x03
	TEXTLINE ""
	LINE.LONG 0x00 " HARD_DFS_CTRL_LO , HARD_DFS_CTRL_LO "

	RGROUP.LONG 0xA8++0x03
	TEXTLINE ""
	LINE.LONG 0x00 " HARD_DFS_CTRL_HI , HARD_DFS_CTRL_HI "


	;BASE &MEM_TYPE:(&DMC_BASE_ADDR)
	;include DMC.per

TREE.END



; ############################ START OF PMU ############################
BASE &MEM_TYPE:(&AON_BASE_ADDR+0x002B0000)

include SoC_PMU.per

; ############################ END OF PMU ############################
; ############################ START OF AON CLK ############################
BASE &MEM_TYPE:(&AON_BASE_ADDR+0x002D0000)

include SoC_AON_CLK.per

; ############################ END OF AON CLK ############################

;CONFIG 16. 8.
WIDTH 23.


include PMIC.per

;CONFIG 16. 8.
WIDTH 23.

